package com.feeyo.groundservice.easyphotoplus.use

import android.content.Context
import android.net.Uri
import android.util.Log
import com.feeyo.groundservice.easyphotoplus.audio.AudioRecorder
import com.feeyo.groundservice.easyphotoplus.interfaces.OnCallbackListener
import com.feeyo.groundservice.easyphotoplus.interfaces.OnResultCallbackListener

/**
 *作者：70893 on 2025-04-06
 *描述：录音
 */
object RecorderVoiceUtil {

    private val mAudioManager by lazy { AudioRecorder.getInstance() }

    fun startRecord(context: Context, callback: OnCallbackListener<String>) {

        mAudioManager.startRecord(context, false, object : AudioRecorder.RecordListener {
            override fun onFilePath(path: String?) {
                path?.let { callback.onCall(it) }
            }
        })

    }

    fun stopRecord() {

        mAudioManager.stopRecord()
    }


}